﻿// -----------------------------------------------------------------------
// <copyright file="EmailServiceElement.cs" company="EPAM Systems">
////Copyright (c) EPAM Systems, 2012. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------

namespace MBOP.Configuration.ConfigElements
{
	#region Usings

	using System.Configuration;

	#endregion

	/// <summary>
	/// Represents the email service config element
	/// </summary>
	public class EmailServiceElement : ConfigurationElement
	{
		#region Properties

		/// <summary>
		/// Gets or sets the smtp host.
		/// </summary>
		[ConfigurationProperty("smtpHost", IsRequired = true)]
		public string SmtpHost
		{
			get
			{
				return (string)this["smtpHost"];
			}

			set
			{
				this["smtpHost"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the host's port
		/// </summary>
		[ConfigurationProperty("port", IsRequired = true)]
		public int Port
		{
			get
			{
				return (int)this["port"];
			}

			set
			{
				this["port"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the email of the sender.
		/// </summary>
		[ConfigurationProperty("senderEmail", IsRequired = true)]
		public string SenderEmail
		{
			get
			{
				return (string)this["senderEmail"];
			}

			set
			{
				this["senderEmail"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the sender displaying name.
		/// </summary>
		[ConfigurationProperty("senderDisplayingName", DefaultValue = "MBOP")]
		public string SenderDisplayingName
		{
			get
			{
				return (string)this["senderDisplayingName"];
			}

			set
			{
				this["senderDisplayingName"] = value;
			}
		}

		#endregion
	}
}
